package com.example.demo.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * <h3>reqister</h3>
 * <p>角色实体</p>
 *
 * @author : chenjunjie
 * @date : 2021-06-24 08:45
 **/
@Getter
@Setter
@ToString
public class Role implements RowMapper<Role> {
    private Integer id;
    private String roleName;
    private Integer status;

    @Override
    public Role mapRow(ResultSet rs, int rowNum) throws SQLException {
        Role role=new Role();
        role.setId(rs.getInt("role_id"));
        role.setRoleName(rs.getString("role_name"));
        role.setStatus(rs.getInt("status"));
        return role;
    }
}
